package test.core;

import java.util.Date;

import org.junit.Test;

import hyl.core.MyFun;

public class testfun {
	//@Test
	public  void test() {
		MyFun.print("第三方",new char[] {'2','3'});
	}
	//@Test
	public void testhash() {
		String bString="少打飞机啊你看";
		System.out.println(bString.hashCode());
		System.out.println("少打飞机啊你看".hashCode());
		System.out.println(System.identityHashCode(bString));
		System.out.println(System.identityHashCode("少打飞机啊你看"));

		bString="少打飞机啊我你看";
		System.out.println(System.identityHashCode(bString));
		System.out.println("少打飞机你看".hashCode());
		System.out.println(System.identityHashCode("少打飞机你看"));
	}
//	@Test
	public  void test3() {
		Object[]  objs=new Object[] {244,"----",new Date(),"才行不行吃吧"};
		
		System.out.println(MyFun.join(objs) );
		System.out.println(MyFun.join(244,"----",new Date(),"才行不行吃吧") );
		System.out.println(MyFun.join2(",",objs) );
		System.out.println(MyFun.join2(",",244,"----","才行不行吃吧") );

		System.out.println(MyFun.join(MyFun.objs2strs(objs,3,3)) );
	}
	//@Test
	public  void test2() {
		short s=9929;
		byte[] bs=MyFun.short2ByteArray(s);
		short s1 =MyFun.byteArray2Short(bs);
		System.out.println(s1);
	}
	@Test
	public  void test5() {
		String s=MyFun.getUUID();
		System.out.println(s);
		System.out.println(s.length());
	}
}
